<template>
    <div class="header-container">
        <img src="../assets/images/logo.png" alt="" class="i-m-g">
        <h3>后台管理系统</h3>
        <button class="btn btn-danger btn-sm" @click="onLogout">退出登录</button>
    </div>
</template>

<script>
export default {
    name: "connon-header",
    methods: {
        onLogout() {
            localStorage.removeItem("token");
            this.$router.push("/login");
        }
    }
}
</script>

<style>
.header-container {
    position: relative;
    display: flex;
    justify-content: space-around;
    background-color: rgba(7, 1, 43, 0.755);
}

.i-m-g {
    /* margin-left: 300px; */
    position: absolute;
    top: 0;
    left: 300px;
    width: 150px;
    height: 50px;
}

h3 {
    margin-left: 500px;
    height: 40px;
    line-height: 40px;
    color: aliceblue;
    font-weight: bold;

}
</style>